Skip to content

Answer:50 - signal-bug-in-effect#1305

Closed
HichamGuessab wants to merge 1 commit into
tomalaforge:mainfrom
HichamGuessab:50-signal-bug-in-effect
Closed

Answer:50 - signal-bug-in-effect#1305
HichamGuessab wants to merge 1 commit into
tomalaforge:mainfrom
HichamGuessab:50-signal-bug-in-effect

Conversation

@HichamGuessab
Copy link
Copy Markdown

Answer:50

  1. Need someone to know if I am well understanding and for deep dive question.
  2. Any clue for the computed way ?

Thank you !

@github-actions github-actions Bot added 50 bug signal effect: effect not triggered answer answer labels Apr 17, 2025
@StormLx
Copy link
Copy Markdown

StormLx commented Apr 18, 2025

  • I would use 3 separate effects too.
  • I wouldn't use a ternary with undefined.
  • The computed mustn't be used for side effects (such as showing an alert) but to compute a new value when a signal updates. So what I would do is a computed named "shouldDisplayAlert" that would calculate when we should show the alert, and use that computed in a single effect to display the alert when the value is TRUE.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2025

This pull request is stale because it has been open for 15 days with no activity.

@github-actions github-actions Bot added the stale label May 9, 2025
@github-actions
Copy link
Copy Markdown

This pull request was closed because it has been inactive for 5 days since being marked as stale.

@github-actions github-actions Bot closed this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

50 bug signal effect: effect not triggered answer answer stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants